import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

import Layout from '@/layout/index'
const routes = [
  {
    path: '/',
    name: 'login',
    component: () => import('@/views/login/login.vue')
  },
  {
    path: '/home',
    name: 'Home',
    component: Layout,
    children: [
      {
        path: 'home',
        name: 'Home',
        component: () => import('@/views/home/home/index.vue')
      },
      {
        path: 'appIndex',
        name: 'appIndex',
        component: () => import('@/views/home/home/appIndex.vue')
      },
      {
        path: 'alarm',
        name: 'alarm',
        component: () => import('@/views/home/home/alarm.vue')
      },
      {
        path: 'monitor',
        name: 'monitor',
        component: () => import('@/views/home/home/monitor')
      },
      {
        path: 'img',
        name: 'img',
        component: () => import('@/views/home/home/img.vue')
      },
      {
        path: 'operatingRecord',
        name: 'operatingRecord',
        component: () => import('@/views/home/home/operatingRecord.vue')
      },
      {
        path: 'alarmRecord',
        name: 'alarmRecord',
        component: () => import('@/views/home/home/alarmRecord.vue')
      },
      {
        path: 'serverAlarm',
        name: 'serverAlarm',
        component: () => import('@/views/home/home/serverAlarm.vue')
      },
      {
        path: 'schedulingAlarm',
        name: 'schedulingAlarm',
        component: () => import('@/views/home/home/schedulingAlarm.vue')
      },
      {
        path: 'waterValve',
        name: 'waterValve',
        component: () => import('@/views/home/home/waterValve.vue')
      }
    ]
  },
  {
    path: '/fishpond',
    name: 'Fishpond',
    component: Layout,
    children: [
      {
        path: 'fishpondInfo',
        name: 'FishpondInfo',
        component: () => import('@/views/fishpond/fishpondInfo/index.vue')
      },
      {
        path: 'fishpondDetail',
        name: 'FishpondDetail',
        component: () => import('@/views/fishpond/fishpondDetail/index.vue')
      }
    ]
  },
  {
    path: '/Remediation',
    name: 'Remediation',
    component: Layout,
    children: [
      {
        path: 'home',
        name: 'home',
        component: () => import('@/views/Remediation/home/index.vue')
      }
    ]
  },
  {
    path: '/schedule',
    name: 'Schedule',
    component: Layout,
    children: [
      {
        path: 'scheduleInfo',
        name: 'ScheduleInfo',
        component: () => import('@/views/schedule/scheduleInfo/index.vue')
      },
      {
        path: 'template',
        name: 'template',
        component: () => import('@/views/schedule/template/index.vue')
      },
      {
        path: 'scheduledetails',
        name: 'scheduledetails',
        component: () => import('@/views/schedule/scheduledetails/index.vue')
      },
      {
        path: 'SchedulePreview',
        name: 'SchedulePreview',
        component: () => import('@/views/schedule/SchedulePreview/index.vue')
      },
      {
        path: 'schedulingTool',
        name: 'schedulingTool',
        component: () => import('@/views/schedule/schedulingTool/index.vue')
      }
    ]
  },
  {
    path: '/device',
    name: 'Device',
    component: Layout,
    children: [
      {
        path: 'controlBox',
        name: 'ControlBox',
        component: () => import('@/views/device/controlBox/index.vue')
      },
      {
        path: 'sensor',
        name: 'Sensor',
        component: () => import('@/views/device/sensor/index.vue')
      },
      {
        path: 'abnormal',
        name: 'abnormal',
        component: () => import('@/views/device/sensor/abnormal.vue')
      },
      {
        path: 'sensorManagement',
        name: 'sensorManagement',
        component: () => import('@/views/device/sensorManagement/index.vue')
      },
      {
        path: 'camera',
        name: 'camera',
        component: () => import('@/views/device/camera/index.vue')
      },
      {
        path: 'cameraHistory',
        name: 'cameraHistory',
        component: () => import('@/views/device/cameraHistory/index.vue')
      },
      {
        path: 'sysBoxDetail',
        name: 'sysBoxDetail',
        component: () => import('@/views/device/controlBox/detail.vue')
      },
      {
        path: 'sysSensorHistory',
        name: 'sysSensorHistory',
        component: () => import('@/views/device/sensor/history.vue')
      },
      {
        path: 'alarmEquipment',
        name: 'alarmEquipment',
        component: () => import('@/views/device/alarmEquipment/index.vue')
      },
      {
        path: 'modelAlarmDetail',
        name: 'modelAlarmDetail',
        component: () => import('@/views/device/modelAlarmDetail/index.vue')
      },
      {
        path: 'modelOfflineDetail',
        name: 'modelOfflineDetail',
        component: () => import('@/views/device/modelOfflineDetail/index.vue')
      },

      {
        path: 'deviceGroup',
        name: 'deviceGroup',
        component: () => import('@/views/device/deviceGroup/index.vue')
      },
      {
        path: 'alarmGrouping',
        name: 'alarmGrouping',
        component: () => import('@/views/device/alarmGrouping/index.vue')
      },
      {
        path: 'alarmTemplate',
        name: 'alarmTemplate',
        component: () => import('@/views/device/alarmTemplate/index.vue')
      },
      {
        path: 'modelOfflineDetail',
        name: 'modelOfflineDetail',
        component: () => import('@/views/device/modelOfflineDetail/index.vue')
      },
      {
        path: 'modelOfflineDevice',
        name: 'modelOfflineDevice',
        component: () => import('@/views/device/modelOfflineDevice/index.vue')
      },
      {
        path: 'modelOfflineGroup',
        name: 'modelOfflineGroup',
        component: () => import('@/views/device/modelOfflineGroup/index.vue')
      },
      {
        path: 'modelOfflineSettings',
        name: 'modelOfflineSettings',
        component: () => import('@/views/device/modelOfflineSettings/index.vue')
      },
      {
        path: 'analysis',
        name: 'analysis',
        component: () => import('@/views/device/analysis/index.vue')
      },
      {
        path: 'energyAnalysis',
        name: 'energyAnalysis',
        component: () => import('@/views/device/energyAnalysis/index.vue')
      }
    ]
  },
  {
    path: '/inspect',
    name: 'Inspect',
    component: Layout,
    children: [
      {
        path: 'dataTaskRenovate',
        name: 'DataTaskRenovate',
        component: () => import('@/views/inspect/dataTaskRenovate/index.vue')
      }
    ]
  },
  {
    path: '/repair',
    name: 'Repair',
    component: Layout,
    children: [
      {
        path: 'dataRepair',
        name: 'DataRepair',
        component: () => import('@/views/repair/dataRepair/index.vue')
      }
    ]
  },
  {
    path: '/system/company',
    name: 'Company',
    component: Layout,
    children: [
      {
        path: 'companyInfo',
        name: 'CompanyInfo',
        component: () => import('@/views/system/company/companyInfo/index.vue')
      },
      {
        path: 'departInfo',
        name: 'DepartInfo',
        component: () => import('@/views/system/company/departInfo/index.vue')
      },
      {
        path: 'departPosition',
        name: 'DepartPosition',
        component: () => import('@/views/system/company/departPosition/index.vue')
      },
      {
        path: 'employeInfo',
        name: 'EmployeInfo',
        component: () => import('@/views/system/company/employeInfo/index.vue')
      }
    ]
  },
  {
    path: '/system/system',
    name: 'System',
    component: Layout,
    children: [
      {
        path: 'sysRole',
        name: 'SysRole',
        component: () => import('@/views/system/system/sysRole/index.vue')
      },
      {
        path: 'sysUser',
        name: 'SysUser',
        component: () => import('@/views/system/system/sysUser/index.vue')
      },
      {
        path: 'user',
        name: 'user',
        component: () => import('@/views/system/system/user/index.vue')
      },
      {
        path: 'beifen',
        name: 'beifen',
        component: () => import('@/views/system/system/beifen/index.vue')
      },
      {
        path: 'historicalPush',
        name: 'historicalPush',
        component: () => import('@/views/system/system/historicalPush/index.vue')
      },
      {
        path: 'sysLog',
        name: 'SysLog',
        component: () => import('@/views/system/system/sysLog/index.vue')
      }
    ]
  },
  {
    path: '/filtration',
    name: 'filtration',
    component: Layout,
    children: [
      {
        path: 'home',
        name: 'home',
        component: () => import('@/views/filtration/home/index.vue')
      },
      {
        path: 'history',
        name: 'history',
        component: () => import('@/views/filtration/home/history.vue')
      },
      {
        path: 'more',
        name: 'more',
        component: () => import('@/views/filtration/home/more.vue')
      }
    ]
  },
  {
    path: '/transfer',
    name: 'transfer',
    component: Layout,
    children: [
      {
        path: 'home',
        name: 'home',
        component: () => import('@/views/transfer/home/index.vue')
      },
      {
        path: 'history',
        name: 'history',
        component: () => import('@/views/transfer/home/history.vue')
      }
    ]
  },

  {
    path: '/godownProcurement',
    name: 'godownProcurement',
    component: Layout,
    children: [
      {
        path: 'godownProcurement',
        name: 'godownProcurement',
        component: () => import('@/views/godownProcurement/index.vue')
      },
      {
        path: 'record',
        name: 'record',
        component: () => import('@/views/godownProcurement/record.vue')
      }
    ]
  },

  {
    path: '/ProcessingOut',
    name: 'ProcessingOut',
    component: Layout,
    children: [
      {
        path: 'ProcessingOut',
        name: 'ProcessingOut',
        component: () => import('@/views/ProcessingOut/index.vue')
      },
      {
        path: 'record',
        name: 'record',
        component: () => import('@/views/ProcessingOut/record.vue')
      }
    ]
  },
  {
    path: '/SaleOut',
    name: 'SaleOut',
    component: Layout,
    children: [
      {
        path: 'home',
        name: 'home',
        component: () => import('@/views/SaleOut/home/index.vue')
      },
      {
        path: 'record',
        name: 'record',
        component: () => import('@/views/SaleOut/home/record.vue')
      }
    ]
  },

  {
    path: '/DeadOut',
    name: 'DeadOut',
    component: Layout,
    children: [
      {
        path: 'home',
        name: 'home',
        component: () => import('@/views/DeadOut/home/index.vue')
      }
      // {
      //   path: "record",
      //   name: "record",
      //   component: () => import("@/views/DeadOut/home/record.vue"),
      // },
    ]
  },

  {
    path: '/OutherOut',
    name: 'OutherOut',
    component: Layout,
    children: [
      {
        path: 'home',
        name: 'home',
        component: () => import('@/views/OutherOut/home/index.vue')
      },
      {
        path: 'record',
        name: 'record',
        component: () => import('@/views/OutherOut/home/record.vue')
      }
    ]
  },
  {
    path: '/adjustment',
    name: 'adjustment',
    component: Layout,
    children: [
      {
        path: 'home',
        name: 'home',
        component: () => import('@/views/adjustment/home/index.vue')
      },
      {
        path: 'record',
        name: 'record',
        component: () => import('@/views/adjustment/home/record.vue')
      }
    ]
  },
  {
    path: '/adjustment_',
    name: 'adjustment_',
    component: Layout,
    children: [
      {
        path: 'home',
        name: 'home',
        component: () => import('@/views/adjustment_/home/index.vue')
      },
      {
        path: 'record',
        name: 'record',
        component: () => import('@/views/adjustment_/home/record.vue')
      }
    ]
  },
  {
    path: '/allot',
    name: 'allot',
    component: Layout,
    children: [
      {
        path: 'home',
        name: 'home',
        component: () => import('@/views/allot/home/index.vue')
      },
      {
        path: 'record',
        name: 'record',
        component: () => import('@/views/allot/home/record.vue')
      }
    ]
  },
  {
    path: '/breeding',
    name: 'breeding',
    component: Layout,
    children: [
      {
        path: 'carUser',
        name: 'carUser',
        component: () => import('@/views/breeding/carUser/index.vue')
      },
      {
        path: 'fishFiles',
        name: 'fishFiles',
        component: () => import('@/views/breeding/fishFiles/index.vue')
      },
      {
        path: 'fishFilesDetail',
        name: 'fishFilesDetail',
        component: () => import('@/views/breeding/fishFilesDetail/index.vue')
      },
      {
        path: 'fishType',
        name: 'fishType',
        component: () => import('@/views/breeding/fishType/index.vue')
      },
      {
        path: 'fishpond',
        name: 'fishpond',
        component: () => import('@/views/breeding/fishpond/index.vue')
      },
      {
        path: 'fishPondFeeding',
        name: 'fishPondFeeding',
        component: () => import('@/views/breeding/fishPondFeeding/index.vue')
      },
      {
        path: 'chart',
        name: 'chart',
        component: () => import('@/views/breeding/fishpond/chart.vue')
      },
      {
        path: 'history',
        name: 'history',
        component: () => import('@/views/breeding/fishpond/history.vue')
      },
      {
        path: 'fishpondDetail',
        name: 'fishpondDetail',
        component: () => import('@/views/breeding/fishpondDetail/index.vue')
      },
      {
        path: 'Inbound',
        name: 'Inbound',
        component: () => import('@/views/breeding/Inbound/index.vue')
      },
      {
        path: 'vehicleDetails',
        name: 'vehicleDetails',
        component: () => import('@/views/breeding/vehicleDetails/index.vue')
      },
      {
        path: 'targetAddress',
        name: 'targetAddress',
        component: () => import('@/views/breeding/targetAddress/index.vue')
      },
      {
        path: 'diameter',
        name: 'diameter',
        component: () => import('@/views/breeding/diameter/index.vue')
      },
      {
        path: 'solos',
        name: 'solos',
        component: () => import('@/views/breeding/solos/index.vue')
      }
    ]
  },
  {
    path: '/stock',
    name: 'Stock',
    component: Layout,
    children: [
      {
        path: 'purchase',
        name: 'Purchase',
        component: () => import('@/views/stock/purchase/index.vue')
      },
      {
        path: 'purchaseDetail',
        name: 'PurchaseDetail',
        component: () => import('@/views/stock/purchaseDetail/index.vue')
      },
      {
        path: 'castnet',
        name: 'Castnet',
        component: () => import('@/views/stock/castnet/index.vue')
      },
      {
        path: 'other',
        name: 'Other',
        component: () => import('@/views/stock/other/index.vue')
      }
    ]
  },
  {
    path: '/outStock',
    name: 'OutStock',
    component: Layout,
    children: [
      {
        path: 'sell',
        name: 'Sell',
        component: () => import('@/views/outStock/sell/index.vue')
      },
      {
        path: 'process',
        name: 'Process',
        component: () => import('@/views/outStock/process/index.vue')
      },
      {
        path: 'die',
        name: 'Die',
        component: () => import('@/views/outStock/die/index.vue')
      },
      {
        path: 'detail',
        name: 'detail',
        component: () => import('@/views/outStock/detail/index.vue')
      },
      {
        path: 'other',
        name: 'other',
        component: () => import('@/views/outStock/other/index.vue')
      }
    ]
  },
  {
    path: '/fishTransfer',
    name: 'FishTransfer',
    component: Layout,
    children: [
      {
        path: 'inner',
        name: 'Inner',
        component: () => import('@/views/fishTransfer/inner/index.vue')
      },
      {
        path: 'base',
        name: 'Base',
        component: () => import('@/views/fishTransfer/base/index.vue')
      }
    ]
  },
  {
    path: '/adjust',
    name: 'Adjust',
    component: Layout,
    children: [
      {
        path: 'fishadjust',
        name: 'FishAdjust',
        component: () => import('@/views/adjust/fishAdjust/index.vue')
      },
      {
        path: 'weight',
        name: 'Weight',
        component: () => import('@/views/adjust/weight/index.vue')
      },
      {
        path: 'weightDeatil',
        name: 'weightDeatil',
        component: () => import('@/views/adjust/weightDeatil/index.vue')
      },
      {
        path: 'adjustDetail',
        name: 'adjustDetail',
        component: () => import('@/views/adjust/adjustDetail/index.vue')
      }
    ]
  },
  {
    path: '/vehicleAllotment',
    name: 'vehicleAllotment',
    component: Layout,
    children: [
      {
        path: 'vehicleAllotmentIn',
        name: 'vehicleAllotmentIn',
        component: () => import('@/views/vehicleAllotment/vehicleAllotmentIn/index.vue')
      },
      {
        path: 'vehicleAllotmentInDetail',
        name: 'vehicleAllotmentInDetail',
        component: () => import('@/views/vehicleAllotment/vehicleAllotmentInDetail/index.vue')
      },
      {
        path: 'vehicleAllotmentOut',
        name: 'vehicleAllotmentOut',
        component: () => import('@/views/vehicleAllotment/vehicleAllotmentOut/index.vue')
      }
    ]
  },
  {
    path: '/internalTransfer',
    name: 'internalTransfer',
    component: Layout,
    children: [
      {
        path: 'transfer',
        name: 'transfer',
        component: () => import('@/views/internalTransfer/transfer/index.vue')
      },
      {
        path: 'transferBase',
        name: 'transferBase',
        component: () => import('@/views/internalTransfer/transferBase/index.vue')
      },
      {
        path: 'transferDetail',
        name: 'transferDetail',
        component: () => import('@/views/internalTransfer/transferDetail/index.vue')
      }
    ]
  }
]

const router = new VueRouter({
  // mode: 'history',
  // base: process.env.BASE_URL,
  routes
})

export default router
